package com.bitc.crash.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.bitc.crash.model.entity.Order;
import com.bitc.crash.model.request.CreateOrderRequest;
import com.bitc.crash.model.vo.OrderVO;

import jakarta.servlet.http.HttpServletRequest;

/**
 * 订单服务接口
 */
public interface OrderService extends IService<Order> {

    /**
     * 创建订单
     */
    OrderVO createOrder(CreateOrderRequest createOrderRequest, HttpServletRequest request);

    /**
     * 获取订单封装
     */
    OrderVO getOrderVO(Order order);

    /**
     * 根据订单号查询订单
     */
    Order getOrderByOrderNo(String orderNo);

    /**
     * 根据取餐码查询订单
     */
    Order getOrderByPickupCode(String pickupCode);

    /**
     * 更新订单状态
     */
    boolean updateOrderStatus(Long orderId, Integer orderStatus);

    /**
     * 更新支付状态
     */
    boolean updatePaymentStatus(Long orderId, Integer paymentStatus, String transactionId);

    /**
     * 更新出品状态
     */
    boolean updateProductionStatus(Long orderId, Integer productionStatus);
} 